dofile (getScriptPath() .. "\\..\\processor\\processor.lua")

dofile (getScriptPath() .. "\\..\\lib\\lib.lua")
dofile (getScriptPath() .. "\\..\\lib\\orders.lua")
dofile (getScriptPath() .. "\\..\\lib\\actions.lua")

script_name = string.gsub(string.gsub(debug.getinfo(1).short_src, "%.[^%.]*$", ""), "^.*[\\/]", "")



lib:remove(lib.path.orders .. "limit.0")


--[[
processor:AddInit(function()
	local instrument = lib:GetInstrument(sec_code)
	instrument.ex__ = {}
	instrument.ex__.sl = sl
	instrument.ex__.tp = tp
	instrument.ex__.qty = 1
	
	orders:SendTakeStop(instrument)
end)
--]]

--[[
processor:AddInit(function()
	local instrument = lib:GetInstrument(sec_code)
	instrument.lm__ = lm
	instrument.side__ = "B"
	instrument.qty__ = 1
	
	orders:SendLimit(instrument)
end)
	
processor:AddTimer(function(t)
	if orders:InProcess() then
		message("TEST InProcess")
		return true
	end
end)
	
processor:AddTimer(function(t)
	actions:Shift(sec_code)
end)
--]]
--[[	
processor:AddTimer(function(t)
	if price then
		message("TEST SetStopPrice " .. tostring(orders:SetStopPrice(sec_code, price)))
		price = nil
		return true
	end
end)
--]]
processor:AddTimer(function(t)
	processor:stop(0)
end)


